<!--
 * @Description:
 * @Author:Huang Xin Ming
 * @Date:2024-11-11 10:59:57
 * @LastEditors:Huang Xin Ming
 * @LastEditTime:2024-11-12 09:12:24
-->
<script setup lang="ts">
import { useLoginStore } from '@/store/modules/login';
const { WXLogin, Login } = useLoginStore()

/**
 * @Description: 系统登录
 * @return {*}
 * @author:Huang Xin Ming
 */
const goLogin = async () => {
  await Login({
    username: 'admin',
    password: 'admin123',
    code: 1,
    uuid: '4978836ad76c4dcba2f2f6ae1ea40270'
  })
}
/**
 * @Description: 微信登录
 * @return {*}
 * @author:Huang Xin Ming
 */
const goWXLogin = () => {
    WXLogin(30000).then(res => {
        console.log(res);
    })
}
</script>
<template>
    <view class="main">
        <wd-button size="large" block @click="goLogin">登录</wd-button>
        <wd-button size="large" :custom-class="'m-top-20'" block @click="goWXLogin">WX登录</wd-button>
    </view>
</template>

<style lang="scss" scoped>
.main {
  padding: 20rpx;
}
</style>